#!/usr/bin/python
# -*- coding:utf-8 -*-
# @author  : micah
# @time    :  
# @function: 
# @version :


import time
import asyncio

now = lambda: time.time()


async def func():
    task_1 = asyncio.create_task(asyncio.sleep(1))
    task_2 = asyncio.create_task(asyncio.sleep(1))
    await task_1
    await task_2


start = now()

for i in range(5):
    asyncio.run(func())

print('异步所花费的时间：%f s' % (now() - start))

